package server.comunicacion;

//import cliente.comunicacion.*;
import cliente.comunicacion.ICliente;
import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.sql.SQLException;
import server.dominio.Beneficiario;
import server.dominio.ISesion;
import server.dominio.Medico;
import server.excepciones.BeneficiarioInexistenteException;
import server.excepciones.BeneficiarioNoExistenteException;
import server.excepciones.BeneficiarioYaExistenteException;
import server.excepciones.MedicoInexistenteException;
import server.excepciones.MedicoNoExistenteException;
import server.excepciones.MedicoYaExistenteException;
import server.excepciones.UsuarioIncorrectoException;






public interface IServidorA extends Remote {

	public void conectar() throws MalformedURLException, RemoteException;
        public void desconectar() throws RemoteException, MalformedURLException, NotBoundException;
	public ISesion identificar(String login, String password) throws RemoteException, UsuarioIncorrectoException, SQLException;

	public Beneficiario getBeneficiario(long idSesion, String dni) throws RemoteException, BeneficiarioInexistenteException, SQLException,Exception;

	public Medico getMedico(long idSesion, String dni) throws RemoteException, MedicoInexistenteException, SQLException, Exception;

        //public void regist(long idSesion);
	public void crear (long idSesion, Beneficiario beneficiario) throws RemoteException, BeneficiarioYaExistenteException, SQLException, Exception;
	public void modificar(long idSesion, Beneficiario beneficiario) throws RemoteException, BeneficiarioNoExistenteException, SQLException, Exception;
	public void crear(long idSesion, Medico medico) throws RemoteException, MedicoYaExistenteException, SQLException, Exception;
	public void modificar(long idSesion, Medico medico) throws RemoteException, MedicoNoExistenteException, SQLException, Exception;
        public void registrar(long idSesion, ICliente cliente) throws RemoteException, Exception;
        public void mensajeAuxiliar(long idSesion, long codigoDeMensaje, Object informacion)  throws RemoteException, SQLException, Exception;
}
